import java.lang.reflect.Array;

//class MyArray1{
//    public Object[] array=new Object[10];
//    public Object getPos(int pos){
//        return this.array[pos];
//    }
//    public void setVil(int pos,Object vil){
//        this.array[pos]=vil;
//    }
//}
class MyArray<T>{//1
    public T[] array;
    public MyArray(){

    }
    public MyArray(Class<T>clazz,int capacity){
        array=(T[])Array.newInstance(clazz,capacity);
    }

    public T getPos(int pos){
        return this.array[pos];
    }
    public void setVil(int pos,T vil){
        this.array[pos]=vil;
    }
    public T[] getArray(){
        return array;
    }
}
public class Test {
    public static void main(String[] args) {
        Max<Integer>l1;
    }
    public static void main1(String[] args) {
        MyArray <Integer> myArray=new MyArray<>();//3
        myArray.setVil(2,3);
        int ret=myArray.getPos(2);//4
        Integer[] integers=myArray.getArray();
    }
}

class Max<T extends Number>{

}
 class MyArray1<E extends Comparable<E>>{

}

